// 报错：Uncaught ReferenceError: process is not defined
// const isSSR = Boolean(
//   process.env.SSR || process.env.SSG || process.env.VITE_SSR || process.env.VITE_SSG
// )
const importMeta = import.meta as ImportMeta & {env: Record<string, any>}

/**
 * 判断是不是服务端渲染
 */
export const isSSR = () => importMeta.env?.SSR || importMeta.env?.SSG || importMeta.env?.VITE_SSR || importMeta.env?.VITE_SSG
